# template makefile
BINARY = mainbin
OBJECTS = main.o bitmap.o
COMPILEFLAGS = -ggdb3 -c	# the debug '-g' flag is given here so that 'LINKFLAGS' has a string
LINKFLAGS = -ggdb3		# ^^
GCC = g++ -Wall
LIBRARIES = -lSDL -lSDL_image ## -lGL -lGLU -lXrandr -lXext -lX11
##-lIrrlicht	# not sure if this is correct for irrlicht libs

# productions
all : $(BINARY)
	# no commands here

clean : 
	rm $(OBJECTS) $(BINARY)

# link main binary executable
$(BINARY) : $(OBJECTS)
	$(GCC) $(LINKFLAGS) $(LIBRARIES) $(OBJECTS) -o $(BINARY)

# compile main
main.o : main.cpp Includes.h
	$(GCC) $(COMPILEFLAGS) main.cpp -o main.o

# compile all 'OBJECTS'
bitmap.o : Bitmap.h Bitmap.cpp
	$(GCC) $(COMPILEFLAGS) Bitmap.cpp -o bitmap.o